@extends('layouts.normal')
@section('self-style')
    <link rel="stylesheet" href="/package/plugins/bs-fun/bs-is-fun.css">
    <link rel="stylesheet" href="/package/plugins/bootstrap-table/bootstrap-table.min.css">
@endsection
@section('local-style')
    <style type="text/css">
        .bootstrap-table .fixed-table-toolbar button {color: inherit;}
        .pagination-detail .btn-group button {color: inherit;}
        table .btn {margin-left: 10px;}
        .modal input[type="radio"] {margin-left: 20px;margin-right: 10px;}
        .modal .modal-footer button {margin-left: 40px;margin-right: 40px;}
        .upload-identity-front, .upload-identity-back {
            width: 120px;
            height: 80px;
        }
        #qrcode {
            width: 150px;
            height: 150px;
        }
    </style>
@endsection
@section('menu')
    @include("teacher.layouts.menu")
@endsection

@section("header")
    <section class="content-header">
        <h4>
            合同管理
            <b>/</b>
            合同列表
        </h4>
    </section>
@endsection

@section('content')
    <section class="content">
        <div class="row">
            <!-- /.col -->
            <div class="col-md-12">
                <div class="box">
                    <div class="box-header">
                    </div>
                    <!-- /.box-header -->
                    <div class="box-body">
                        <table id="contract-table" data-height="600"></table>
                    </div>
                    <!-- /.tab-content -->
                </div>
                <!-- /.nav-tabs-custom -->
            </div>
            <!-- /.col -->
        </div>
        <!-- /.row -->
    </section>
@endsection


@section('modal')
    <div class="modal fade" id="view-contract-dialog">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title">合同进度</h4>
                </div>
                <div class="modal-body">
                    <div class="form-horizontal m-t">
                        <div class="form-group">
                            <label class="control-label col-sm-3">合同模板</label>
                            <div class="col-sm-9">
                                <label class="control-label">
                                    <a target="_blank" class="contract-template" href="">查看</a>
                                    <input type="hidden" class="contract-id">
                                    <input type="hidden" class="contract-process">
                                </label>
                            </div>
                        </div>
                        <div class="form-group">
                            <ul class="nav nav-pills nav-justified step step-arrow contract-step">
                                <li class="active">
                                    <a>创建合同</a>
                                </li>
                                <li>
                                    <a>身份认证</a>
                                </li>
                                <li>
                                    <a>身份审核</a>
                                </li>
                                <li>
                                    <a>支付押金</a>
                                </li>
                                <li>
                                    <a>完成</a>
                                </li>
                            </ul>
                        </div>
                        <div class="form-group upload-identity hidden">
                            <label class="control-label col-sm-3">上传身份证</label>
                            <div class="col-sm-4">
                                <div class="identity-front pull-left">
                                    <input type="hidden" name="identity-front" class="upload-img-input input-identity-front">
                                    <div class="upload-identity-front" style="position: relative;">
                                        <img class="img-identity-front" src="/images/front.png" width="120" height="80">
                                    </div>
                                    <a id="text-identity-front">上传身份证正面</a>
                                </div>
                            </div>
                            <div class="col-sm-1"></div>
                            <div class="col-sm-4">
                                <div class="identity-back pull-left">
                                    <input type="hidden" name="identity-back" class="upload-img-input input-identity-back">
                                    <div class="upload-identity-back" style="position: relative;">
                                        <img class="img-identity-back" src="/images/back.png" width="120" height="80">
                                    </div>
                                    <a id="text-identity-back">上传身份证背面</a>
                                </div>
                            </div>
                        </div>
                        <div class="form-group wait-confirm hidden">
                            <label class="control-label col-sm-3"></label>
                            <div class="col-sm-9">
                                <label class="control-label">请等待管理员审核</label>
                            </div>
                        </div>
                        <div class="form-group pay-deposit hidden">
                            <label class="control-label col-sm-3">支付押金</label>
                            <!--    // todo 支付  -->
                            <div class="col-sm-9">
                                <div id="qrcode">
                                    <canvas></canvas>
                                </div>
                                <div>
                                    <input type="hidden" class="contract-deposit">
                                    <input type="hidden" class="contract-order">
                                    <input type="hidden" class="contract-pay-order">
                                </div>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-sm-3">合同编号</label>
                            <div class="col-sm-9">
                                <span class="contract-sn"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-sm-3">关联房源</label>
                            <div class="col-sm-9">
                                <span class="contract-apart"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-sm-3">押金</label>
                            <div class="col-sm-9">
                                <span class="contract-deposit"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-sm-3">订单号</label>
                            <div class="col-sm-9">
                                <span class="contract-order-sn"></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-sm-3">起止时间</label>
                            <div class="col-sm-9">
                                <span class="start-end-time"></span>
                            </div>
                        </div>
                        <div class="form-group contract-attachment-info hidden">
                            <label class="control-label col-sm-3"></label>
                            <div class="col-sm-9">
                                <span class="col-sm-4"></span>
                                <span class="col-sm-1"></span>
                                <span class="col-sm-4 attachment-info"><a target="_blank" href="">查看合同文件</a></span>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="control-label col-sm-3">备注</label>
                            <div class="col-sm-9">
                                <span class="contract-remark"></span>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-primary pull-left btn-save">提交</button>
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                </div>
            </div>
            <!-- /.modal-content -->
        </div>
        <!-- /.modal-dialog -->
    </div>

    <div class="modal fade" id="edit-retire-dialog">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title"> 发起退房</h4>
                </div>
                <div class="modal-body">
                    <div class="form-horizontal m-t">

                    </div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-primary pull-left btn-save">提交</button>
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                </div>
            </div>
            <!-- /.modal-content -->
        </div>
        <!-- /.modal-dialog -->
    </div>
@endsection



@section('self-script')
    <script src="/js/ajaxupload.js"></script>
    <script src="/package/plugins/bootstrap-table/bootstrap-table.min.js"></script>
    <script src="/package/plugins/bootstrap-table/locale/bootstrap-table-zh-CN.min.js"></script>
    <script type="text/javascript" src="/js/teacher/contract-index.js?v={{ time() }}"></script>
@endsection